package com.singzi.javaSenior.annotationTest;

/***
 * 理解Annotation
 */
public class Test01 {
    public static void main(String[] args) {
        Student student = new Student();
        Info info = new Info() {
            @Override
            public void show() {
                System.out.println("124");
            }
        };
        info.eat();
        info.show();
    }
}
class Person{
    private String name;
    private int  age;

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }
    public void walk(){
        System.out.println("人走路");
    }
    public void eat(){
        System.out.println("人吃飯");
    }


}
interface Info{
    void show();
    static void add(){
        System.out.println(123);
    }
    default void eat(){
        System.out.println("吃！");
    }
}
class Student extends Person implements Info{
    @Override
    public void walk() {
        System.out.println("學生走路");
    }

    @Override
    public void show() {
        System.out.println("學生展示");
    }

}